#pragma once
#include "LineCapPlug.h"
#include "DDBufferBlock.h"


#define BadPixelReviseGrade 2

class xtLineBadPixelRevise
{
public:
	xtLineBadPixelRevise(void);
	~xtLineBadPixelRevise(void);

public:
	int SelectFile(char *pFile);
	int GetBadPixelFileInfo(char *pFileName,void *pVoid);

public:
	int Revise(BYTE *pData,zkLineBitInfo *pLineBit);

public:
	int GetBadPixelValue(int x,int y,DWORD &dwValue);
	int SetBadPixelValue(int x,int y,DWORD dwValue);

public:
	int StartRevise(void *pVoid,zkLineBitInfo *pLineBit);
	int SetGrade(int nGrade);
	int SetLineData(BYTE *pData,zkLineBitInfo *pLineBit);
	int SaveReviseFile(char *pFileName);

protected:
	BOOL  m_bReviseLine;

protected:
	zkBadPixelReviseFileInfo m_xBadPixelResviseFile;

protected:
	int  m_nWidth;
	BYTE m_xBadFlag[DD_LINE_MAX_BUFSIZE/2];  

protected:
	int m_nGrade;
};
